import { openBuildService } from '../../helper/service';

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 项目总数
    getProjectNum: {
        url: 'plat/api/v1/project/project_count',
        method: 'get'
    },
    // 总在册人数
    getRegisteredNum: {
        url: 'intecons/api/v1/person/worker/labor_people_registered_count',
        method: 'get'
    },
    // 出勤人数
    getAttendNum: {
        url: 'intecons/api/v1/person/worker/labor_people_attendance_count',
        method: 'get'
    },
    // 实时在场人数
    getIntimeNum: {
        url: 'intecons/api/v1/person/worker/labor_people_scene_count',
        method: 'get'
    },
    // 实时出勤人员列表
    getIntimePersonList: {
        url: 'intecons/api/v1/person/worker/attendance_list',
        method: 'get'
    },
    // 人员籍贯分布
    getPersonOrigin: {
        url: 'intecons/api/v1/person/worker/native_place_distribution',
        method: 'get'
    },
    // 人员年龄分布
    getPersonAge: {
        url: 'intecons/api/v1/person/worker/age_distribution',
        method: 'get'
    },
    // 地区人员在岗热力图
    getPersonHotMap: {
        url: 'intecons/api/v1/person/worker/duty_hot_map',
        method: 'get'
    },
    // 项目出勤率
    getProjectAttendRate: {
        url: 'intecons/api/v1/person/worker/project_duty_and_attendance',
        method: 'get'
    },
    // 人员列表
    getUserList: {
        url: '/intecons/api/v1/person/worker/attendance_list',
        method: 'get'
    },
    // 人员详情
    getUserDetail: {
        url: '/intecons/api/v1/person/worker/info',
        method: 'get'
    },
    // 获取当前单位名称或项目名称
    getCompanyName: {
        url: '/intecons/api/v1/person/worker/get_company_or_project_name',
        method: 'get'
    }
};

export default openBuildService(settings);